package com.aloha.springframework.beans.factory.config;

import com.aloha.springframework.beans.factory.HierarchicalBeanFactory;
import com.aloha.springframework.core.convert.ConversionService;
import com.aloha.springframework.utils.StringValueResolver;

/**
 * @author DaiZhiHeng
 * @description 提供配置的能力
 * @date 2023/7/1 20:55
 */
public interface ConfigurableBeanFactory extends HierarchicalBeanFactory, SingletonBeanRegistry {

    String SCOPE_SINGLETON = "singleton";

    String SCOPE_PROTOTYPE = "prototype";

    /**
     * 添加Bean后置处理器
     */
    void addBeanPostProcessor(BeanPostProcessor beanPostProcessor);

    /**
     * 添加字符串解析器
     */
    void addEmbeddedValueResolver(StringValueResolver valueResolver);

    /**
     * 解析所给的表达式(value)
     */
    String resolveEmbeddedValue(String value);

    void setConversionService(ConversionService conversionService);

    /**
     * 获取服务转换
     */
    ConversionService getConversionService();

    /**
     * 销毁单例对象
     */
    void destroySingletons();


}
